
{% extends 'base_main.html' %}

{% block title %}
    天天生鲜-搜索
{% endblock %}

{% block content %}
	<div class="navbar_con">
		<div class="navbar clearfix">
			<div class="subnav_con fl">
				<h1>全部商品分类</h1>	
				<span></span>			
				<ul class="subnav">
					<li><a href="{% url 'goods:list' 1 %}" class="fruit">新鲜水果</a></li>
					<li><a href="{% url 'goods:list' 2 %}" class="seafood">海鲜水产</a></li>
					<li><a href="{% url 'goods:list' 3 %}" class="meet">猪牛羊肉</a></li>
					<li><a href="{% url 'goods:list' 4 %}" class="egg">禽类蛋品</a></li>
					<li><a href="{% url 'goods:list' 5 %}" class="vegetables">新鲜蔬菜</a></li>
					<li><a href="{% url 'goods:list' 6 %}" class="ice">速冻食品</a></li>
				</ul>
			</div>
			<ul class="navlist fl">
				<li><a href="{% url 'goods:index' %}">首页</a></li>
				<li class="interval">|</li>
				<li><a href="">手机生鲜</a></li>
				<li class="interval">|</li>
				<li><a href="">抽奖</a></li>
			</ul>
		</div>
	</div>

	<div class="breadcrumb">
		<a href="">全部分类</a>
		<span>></span>
		<a href="">搜索</a>
	</div>

	<div class="main_wrap clearfix">
		<div class="l_wrap fl clearfix">
			<div class="new_goods">
				<h3>新品推荐</h3>
                <p>嘻嘻 不开放</p>
                {% comment %}
				<ul>
                    {% for good in new_goods %}
					<li>
						<a href=""><img src=""></a>
						<h4><a href="">{{ good.name }}</a></h4>
						<div class="prize">￥{{ good.shop_price }}</div>
					</li>
                    {% endfor %}
				</ul>
                {% endcomment %}
			</div>
		</div>

		<div class="r_wrap fr clearfix">
			<div class="sort_bar">
				<a href="#" class="active">默认</a>
			</div>
			<ul class="goods_type_list clearfix">
				{% for good in goods %}
				<li>
					<a href="{% url 'goods:detail' good.id %}"><img src="/media/{{ good.goods_front_image }}"></a>
					<h4><a href="{% url 'goods:detail' good.id %}">{{ good.name }}</a></h4>
					<div class="operate">
						<span class="prize">￥{{ good.shop_price }}</span>
						<span class="unit">{{ good.shop_price }}/500g</span>
						<a href="{% url 'goods:detail' good.id %}" class="add_goods" title="加入购物车"></a>
					</div>
				</li>
                {% endfor %}
			</ul>
			{% comment %}
			<div class="pagenation">
                {% if goods.has_previous %}
				<a href="{% url 'goods:search' id %}?page={{ goods.previous_page_number }}">上一页</a>
                {% endif %}
                {% for i in goods.paginator.page_range %}
				<a href="{% url 'goods:search' id %}?page={{ i }}" class="active">{{ i }}</a>
                {% endfor %}
                {% if goods.has_next %}
				<a href="{% url 'goods:search' id %}?page={{ goods.next_page_number }}">下一页></a>
                {% endif %}
			</div>
			{% endcomment %}
		</div>
	</div>
{% endblock %}